<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tld/security.tld" prefix="s" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<%@ taglib uri="/tags/core" prefix="c"%>
<%@ taglib uri="/WEB-INF/tld/security.tld" prefix="s" %>


<fmt:setBundle basename="messages"/>
<br />

<table width="90%" align="center" cellpadding="2" cellspacing="1" border="0" bgcolor="#CCCCC0">	
	<tr>
		<td rowspan="2" align="center" class="titulocolumna"><bean:message key="label.futurepurchase.query.period"/></td>
		<td rowspan="2" align="center" class="titulocolumna"><bean:message key="label.versions.future.distribution.version.nooc" /></td>
		<td colspan="3" class="titulocolumna" align="center"><bean:message key="message.futurepurchase.toneladas" /></td>
		<td colspan="5" class="titulocolumna" align="center"><bean:message key="menu.module.corn.sub.future" /></td>
		<td rowspan="2" class="titulocolumna">&nbsp;</td>		
	</tr>
	<tr>		
		<td class="titulocolumna" align="center"><bean:message key="message.futurepurchase.totals"/></td>
		<td class="titulocolumna" align="center"><bean:message key="label.versions.future.distribution.version.cover"/></td>
		<td class="titulocolumna" align="center"><bean:message key="label.versions.future.distribution.version.forcover"/></td>
		<td class="titulocolumna" align="center"><bean:message key="label.versions.future.distribution.version.required"/></td>
		<td class="titulocolumna" align="center"><bean:message key="label.versions.future.distribution.version.actual"/></td>
		<td class="titulocolumna" align="center"><bean:message key="label.versions.future.distribution.version.asign"/></td>
		<td class="titulocolumna" align="center"><bean:message key="label.versions.future.distribution.version.asignfor"/></td>
		<td class="titulocolumna" align="center"><bean:message key="label.versions.future.distribution.version.receivefor"/></td>			
	</tr>
	<!-- Lista a mostrar  -->
	
		<logic:notEmpty name="distributionFutureVersionList">
		<logic:iterate id="row" name="distributionFutureVersionList" indexId="int_i">
			<tr class="<%=((int_i.intValue()%2)==0?"columnadatoPar":"columnadatoNon")%>">							
				<td align="center"><bean:write name="row" property="periodDescription"/></td>
				<td align="right"><bean:write name="row" property="purchaseOrderNum"/></td>
				<td align="right"><bean:write name="row" property="tonsTotal"/></td>
				<td align="right"><bean:write name="row" property="tonsAssigned"/></td>
				<td align="right"><bean:write name="row" property="tonsAboutToAssign"/></td>
				<td align="right"><bean:write name="row" property="futRequired"/></td>
				<td align="right"><bean:write name="row" property="futActual"/></td>
				<td align="right"><bean:write name="row" property="futAssigned"/></td>
				<td align="right"><bean:write name="row" property="futByAssign"/></td>
				<td align="right">

					<logic:greaterThan name="row" property="futByRetrieve" value="0">
						<bean:write name="row" property="futByRetrieve"/>
					</logic:greaterThan>

				</td>
				<td align="center">
					<s:entidad nombreCortoEnt="DISTEDIT" permiso="ADMINISTRACION" nombreCortoMod="PROC" nombreCortoSub="VERDISTR">
						<html:link action="/detailDistributionFutureVersion.do" paramId="futurePeriodId" paramName="row" paramProperty="futurePeriodId"> <img alt="<bean:message key="common.edit"/> <bean:write name="row" property="futurePeriodId"/>" src="images/application_side_list.png" border="0"> </html:link>
						<!--<a href="detailDistributionFutureVersion.do"><img alt="<fmt:message key="label.versions.future.distribution.version.detail"/>" src="images/application_side_list.png" border="0"></a>-->
					</s:entidad>	
				</td>		
			</tr>
		</logic:iterate>
	</logic:notEmpty>
	
</table>
<br />
<br />
<table width="90%" align="center" cellpadding="2" cellspacing="1" border="0" bgcolor="#CCCCC0">
	<tr>		
		<td align="center" class="titulo_lista_interna">
			<s:entidad nombreCortoEnt="DISTRIB" permiso="ADMINISTRACION" nombreCortoMod="PROC" nombreCortoSub="VERDISTR">
				<html:button property="distribution" onclick="location.href ='saveDistribution.do'" styleClass="boton"><bean:message key="label.versions.future.distribution.version.distribution"/></html:button>&nbsp;
			</s:entidad>
			<s:entidad nombreCortoEnt="DISTDELE" permiso="ADMINISTRACION" nombreCortoMod="PROC" nombreCortoSub="VERDISTR">
				<html:button property="delDistribution" onclick="location.href ='deleteDistribution.do'" styleClass="boton_large"><bean:message key="label.versions.future.distribution.version.deldistribution"/></html:button>&nbsp;
			</s:entidad>
			<html:button property="back" onclick="location.href ='showVersionDetail.do'" styleClass="boton"><bean:message key="label.common.back"/></html:button>
		</td>
	</tr>
</table>